import java.util.Scanner;

public class test3 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int n1 = max2(a,b);
        int n2 = max3(a,b,c);
        System.out.println(n1);
        System.out.println(n2);
    }
    //法1
    public static int max2(int a,int b) {
        if(a>b){
            return a;
        }else {
            return b;
        }
    }
    public static int max3(int a,int b,int c){
        if(b > c){
            return max2(a,b);
        }else{
            return max2(a,c);
        }
    }
    //法2
   /* public static int max2(int a,int b) {
        return a > b ? a:b;
    }

    public static int max3(int a,int b,int c) {
        int max = max2(a,b);
        return max > c ? max : c;
    }
    public static void main(String[] args) {
        System.out.println(max3(2, 5, 1));
    }*/
}
